import request from '@/utils/request';


// 查询加分规则记录列表
export function listRecord(query) {
  return request({
    url: '/system/record/list',
    method: 'get',
    params: query
  })
}

// 查询加分规则记录详细
export function getRecord(id) {
  return request({
    url: '/system/record/' + id,
    method: 'get'
  })
}

// 新增加分规则记录
export function addRecord(data) {
  return request({
    url: '/system/record',
    method: 'post',
    data: data
  })
}

// 修改加分规则记录
export function updateRecord(data) {
  return request({
    url: '/system/record/update',
    method: 'post',
    data: data
  })
}

// 删除加分规则记录
export function delRecord(id) {
  return request({
    url: '/system/record/delete/' + id,
    method: 'post'
  })
}

//下载附件
export function downloadMaterial(src){
  return request({
    url:"/common/download/resource",
    params:src,
    method:"get",
    responseType: "blob"
  });
}

//获取学生列表
export function listStu(){
  return request({
    url:"/comp/student/list/name"
  });
}

// 获取大类
export function getCategoryList(){
  return request({
    url:"/system/rules/list"
  })
}